package com.lablzh.gdxy.component;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;

public class VerifyCodeCache {
    private static Cache<String,String> cache = CacheBuilder.newBuilder().build();
    public static void setCode(String uuid,String code) {

        cache.put(uuid,code);
    }

    public static String getCode(String uuid){
        return cache.getIfPresent(uuid);
    }
    public static void deleteCodeFromCache(String uuid){
         cache.invalidate(uuid);
    }

}
